cmake_minimum_required(VERSION 2.6)

set(PROJECT_NAME QMapControl)
project(${PROJECT_NAME})

FIND_PACKAGE(Qt4 REQUIRED)

file(GLOB SOURCES "src/*.cpp" "*.cpp")
file(GLOB HEADERS "src/*.h" "*.h")

QT4_WRAP_CPP(HEADERS_MOC ${HEADERS})

SET(QT_USE_QTNETWORK TRUE)
INCLUDE(${QT_USE_FILE})
ADD_DEFINITIONS(${QT_DEFINITIONS})
ADD_DEFINITIONS(-DQT_PLUGIN)
ADD_DEFINITIONS(-DQT_NO_DEBUG)
ADD_DEFINITIONS(-DQT_SHARED)

ADD_LIBRARY(qmapcontrol ${SOURCES} ${HEADERS} ${HEADERS_MOC})
TARGET_LINK_LIBRARIES(qmapcontrol ${QT_LIBRARIES})

